﻿@model IEnumerable<ArunimaErp.Domain.styleinfo>

@{
    ViewBag.Title = "Index";
}

@using Telerik.Web.Mvc.UI

<script src="../../Scripts/Custom/StyleDialog.js" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $('a:.stylecreate').button();
    })
</script>

<article class="module width_full">
<header><h3>ArunimaErp</h3></header>
<div class="module_content">

<p>@Html.ActionLink("Create New", "Create", null, new { @class="stylecreate"})</p>

<div id="successmessage"></div>

@(Html.Telerik().Grid(Model)
        .Name("StyleGrid")
        .DataKeys(datakeys => datakeys.Add(k => k.StyleId))
            .Columns(columns =>
            {
                columns.Template(c => Html.ActionLink("Edit", "Edit", new { id = c.StyleId }, new { @class = "edit" }) + " | " + Html.ActionLink("Delete", "Delete", new { id = c.StyleId }, new { @class = "delete" }))
                    .Title("Action").Width(80);

                columns.Bound(c => c.StyleNo).Width(80);
                columns.Bound(c => c.StyleDescription).Width(110);
                columns.Bound(c => c.Capacity).Width(110);
                columns.Bound(c => c.devision.DevisionName).Width(60);
                columns.Bound(c => c.BodyStyle).Width(60);
                columns.Bound(c => c.Item).Width(60);
            })
    .ColumnContextMenu()
    .Groupable()
    .Filterable()
    .Pageable(x => x.PageSize(20))
    .Sortable()
    .Scrollable(x => x.Height(400))
    .Resizable(x => x.Columns(true))
    .Reorderable(x => x.Columns(true))
)

</div>
</article>

<div id="StyleDialogDiv" title="Style"></div>